<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>修改记录</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--JQ-->
    <script type="text/javascript" charset="utf-8"
            src="${re.contextPath}/plugin/common/js/jquery-1.8.3.min.js"></script>
    <!--Layui-->
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/common/js/comment.js" charset="utf-8"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
    <style>
        .layui-laypage-limits > select {
            width: 100% !important;
        }
    </style>
</head>

<body>
<div class="myDataCentere mydataCentere-small" style="text-align:center;">
<#--    <div style="align-content: center;"><div style="margin-top: 10px;margin-left: 60px;font-weight:bold;" class="b">驳回原因</div>-->
        <select class="fl" name="remark" id="remark" style="margin-top: 4%;margin-left: 4%;width: 97% !important;"  lay-verify="required">
            <#list baseDict as list>
                <option value="${list.badtName}">${list.badtName}</option>
            </#list>
        </select>
    <input type="hidden" id="caseId" value="${caseId}">
    <input type="hidden" id="taskId" value="${taskId}">
    <input type="hidden" id="taskName" value="${taskName}">
    <input type="hidden" id="businessId" value="${businessId}">
</div>
<div style="background-color: white;background-color: white;padding: 15px;text-align: center;position: fixed;bottom: 1px;width: 100%;">
    <button class="layui-btn layui-btn-sm" lay-filter="submitStage" lay-submit type="button">确定</button>
    <button class="layui-btn layui-btn-primary layui-btn-sm" type="button" id="close">关闭</button>
</div>

<script>
    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form
            ,layer = layui.layer;
        var pageFrom = localStorage.getItem("setjspage");
        $('#close').click(function(){
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        //监听提交
        form.on('submit(submitStage)', function(data){
            $(window.parent.document).find('.forbid').addClass("layui-btn-disabled").attr("disabled", true);
            // caseId
            var caseId = $("#caseId").val();
            // 任务id
            var taskId = $("#taskId").val();

            var taskName = $("#taskName").val();
            // 业务表id
            var businessId = $("#businessId").val();
            //驳回原因
            var remark=$("#remark").val();
            var checkStatus='3';
            var jsonc = {
                caseId: caseId,
                taskId: taskId,
                businessId: businessId,
                remark: remark,
                taskName: taskName,
                checkStatus: checkStatus
            }
            var url = "/supervisor/lcManager/updateCheckGxCheck";
            layerAjax(url, jsonc, '', function (d) {
                if (d.flag == true) {

                    // 恢复按钮可用
                    layer.msg(d.msg);
                    setTimeout(function (){
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                    },1000)
                } else {
                    // 恢复按钮可用
                    $(window.parent.document).find('.forbid').removeClass("layui-btn-disabled").attr("disabled", false);
                    layer.msg(d.msg, {icon: 2});
                }
            });
        });
    });
</script>
</body>
</html>